package com.ec.core.manage;

/**
 * <p>Title: ec</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008 7</p>
 *
 * <p>Company: ec</p>
 *
 * @author pgf
 * @version 1.0
 */
import org.apache.commons.configuration.XMLConfiguration;
import java.util.List;
import java.util.Properties;

public class ConfigurationManage {
    XMLConfiguration config = null;
    private static ConfigurationManage configManage = new ConfigurationManage();
    private ConfigurationManage() {
            try {
               config = new XMLConfiguration("app.xml");
            } catch (Exception ex) {
                ex.printStackTrace();
            }
    }
    public static ConfigurationManage getInstance(){
        return configManage;
    }
    public String getString(String propName){
        return config.getString(propName);
    }
    public int getInteger(String propName){
        return config.getInt(propName);
    }

    public List getList(String propName){
        return config.getList(propName);
    }
    public Object getObject(String propName){
        return config.getProperty(propName);
    }
    public Properties getProperties(String propName){
        return config.getProperties(propName);
    }
    public Object getProperty(String propName){
        return config.getProperty(propName);
    }
}
